package com.ybwh.springboot2.exmple.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import com.alibaba.fastjson.JSON;


/**
 * <p>
 * 账号表
 * </p>
 *
 * @author fanbeibei
 * @since 2023-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user_account")
@ApiModel(value="SysUserAccount对象", description="账号表")
public class SysUserAccount implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "账号")
    @TableField("account")
    private String account;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "显示名称")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "手机号")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "账号类型(root-系统超级管理员,admin-系统管理员,normal-普通账号)")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "状态：1-启用；0-禁用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "是否删除(非0-是,0-否)")
    @TableField("deleted")
    @TableLogic
    private Long deleted;

    @ApiModelProperty(value = "创建人")
    @TableField("create_id")
    private Long createId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("update_id")
    private Long updateId;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;


    public static final String ID = "id";

    public static final String ACCOUNT = "account";

    public static final String PASSWORD = "password";

    public static final String NICK_NAME = "nick_name";

    public static final String MOBILE = "mobile";

    public static final String EMAIL = "email";

    public static final String TYPE = "type";

    public static final String STATUS = "status";

    public static final String DELETED = "deleted";

    public static final String CREATE_ID = "create_id";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_ID = "update_id";

    public static final String UPDATE_TIME = "update_time";





    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
